<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
        xmlns:icecore="http://www.icefaces.org/icefaces/core"
       xmlns:ace="http://www.icefaces.org/icefaces/components"
       xmlns:ice="http://www.icesoft.com/icefaces/component"
       xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title><h:form><h:outputText>Abgaben Hochladen</h:outputText></h:form></title>
    </h:head>
    <h:body>
        <ui:composition template="WEB-INF/templates/lecture.xhtml">
            <ui:define name="content">
                <ice:form>
                <ice:dataTable value="#{uploadBean.activeHandingIns}"
                               var="row">
                    <ice:column>
                        <ice:outputText value="#{row.handingIn.name}" />
                    </ice:column>
                    <ice:column>
                        <h:form>
                            <ace:fileEntry fileEntryListener="#{row.solutionUploadListener}" />
                            <h:commandButton value="Hochladen" />
                        </h:form>
                    </ice:column>
                    <ice:column>
                        <ice:outputText value="Hochgeladen: #{row.file.name}, Größe: #{row.file.length()} Bytes" />
                    </ice:column>
                </ice:dataTable>
                    <ice:commandButton value="Abschicken"
                                       action="#{uploadBean.addHandingIns()}" />
                    </ice:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
